package dataStructure;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import dataStructure.Huffman.Node;

public class Test {
	public static void main(String[] args) {
		List<Node> nodeList = new ArrayList<Node>(Arrays.asList(new Node(1, "A"), new Node(1, "B"),
				new Node(15, "C"), new Node(19, "D"), new Node(18, "E"), new Node(16, "F")));
		System.out.println(nodeList.size());
		for (Node n : nodeList)
			System.out.print(n.value + " ");
		Huffman hTree = new Huffman(nodeList);
		System.out.println("\npre-traversal");
		Huffman.displayTree(hTree.getRoot());
		Huffman.displayCode(hTree.getRoot(), "0");
	}
}
